PSPSDK=$(shell psp-config --pspsdk-path)
PSPDIR=$(shell psp-config --psp-prefix)
TARGET_LIB = libpng.a
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
	pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
	pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o

CFLAGS = -O2 -G0
INCDIR = ../zlib
PSP_FW_VERSION=639

include $(PSPSDK)/lib/build.mak

install: $(TARGET_LIB)
	@echo "Installing libpng into $(PSPDIR)"
	@mkdir -p $(PSPDIR)/include $(PSPDIR)/lib
	@cp png.h pngconf.h $(PSPDIR)/include
	@cp libpng.a  $(PSPDIR)/lib
	@echo "Done"
